struct chmFile;

@interface CHMDocument : NSDocument
{
    IBOutlet NSProgressIndicator*   _progressIndicator;
    IBOutlet NSTextField*           _statusText;
    IBOutlet NSTextField*           _itemCountText;
    IBOutlet NSButton*              _expandButton;
    IBOutlet NSButton*              _cancelButton;
    
@protected
    NSString*                       _filePath;
    struct chmFile*                 _file;
    int                             _itemCount;
    NSString*                       _expandRootPath;
    NSLock*                         _expansionLock;
    volatile bool                   _expanding;
    volatile bool                   _cancel;
}

- (BOOL) readFromURL: (NSURL*) absoluteURL 
              ofType: (NSString*) typeName 
               error: (NSError**) outError;

- (IBAction) cancel: (id) sender;
- (IBAction) expand: (id) sender;

@end
